package com.xiaowei.gym.gymjsp.ware.service.impl;

import com.xiaowei.gym.gymjsp.ware.dao.BaseDao;
import com.xiaowei.gym.gymjsp.ware.dao.GymMenuDao;
import com.xiaowei.gym.gymjsp.ware.dao.UserDao;
import com.xiaowei.gym.gymjsp.ware.dao.impl.GymMenuDaoImpl;
import com.xiaowei.gym.gymjsp.ware.dao.impl.USerDaoImpl;
import com.xiaowei.gym.gymjsp.ware.entity.UserEntity;
import com.xiaowei.gym.gymjsp.ware.service.UserService;

import java.security.NoSuchAlgorithmException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class UserServiceImpl implements UserService {

    private UserDao userDao;

    public UserServiceImpl(){
        userDao = new USerDaoImpl();
    }

    @Override
    public void createUser(UserEntity user) {

    }

    @Override
    public UserEntity getUserById(int id) throws SQLException {
        return null;
    }

    @Override
    public UserEntity getUserByUsername(String username) throws SQLException {
        return null;
    }

    @Override
    public boolean verifyPassword(UserEntity user, String password) throws NoSuchAlgorithmException {
        return false;
    }

    @Override
    public int getUserCount() {
        return getUserCount();
    }

    @Override
    public UserEntity validate(String username, String password) {
        return userDao.validate(username, password);
    }

    @Override
    public List<UserEntity> getUserList(String queryUserName, int currentPageNo, int pageSize) {
        return userDao.getUserList(queryUserName,currentPageNo,pageSize);
    }


}
